package com.sky.mapper;


import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    /*
    * 批量添加菜品的口味
    * */
    void insertBantch(List<DishFlavor> flavors);

    /*
    *根据菜品的id删除相关的口味信息
    * */
    @Delete("delete from dish_flavor where dish_id = #{id}")
    void deleteByDishId(Long dishId);

    /*
    * 批量删除口味信息
    * */
    void deleteByDishIds(List<Long> dishIds);

    /*
    * 格局菜品id查询口味信息
    * */
    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> getByDishId(Long Dishid);
}
